package org.example.chain;

public class ChainFlow {
    private Handler handler;
    ChainFlow(){
        handler = new HairDresserHandler();
    }

    public Handler chainHandle(){
        handler.setNextHandler(new MakeupDresserHandler())
                .setNextHandler(new ClothDresserHandler())
                .setNextHandler(new LipstickHandler());
        return handler;
    }

    public void execute(){
        handler.execute();
    }
}
